<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <div class="box">
        <p>111</p>
    </div>

    <script>

        // cloneNode()    参数默认是false  不可隆子节点    true -> 克隆子节点

        var oDiv = document.querySelector('div');

        var oDiv2 = oDiv.cloneNode(true);

        oDiv.innerHTML = 3;

        console.log(oDiv2);


    </script>

</body>

</html>